

public class DirectSort {
	
	public static void main(String[] args){
		
		int[] a = {2,4,6,5,3,1};
		
		for (int i=0;i<a.length-1;i++) {
			
			if (a[i] < a[i+1]) {
				int temp;
				temp = a[i];
				a[i] = a[i+1];
				a[i+1] = temp;
			}
			
			for (int j=0;j<a.length;j++) {
				System.out.print(a[j]+" ");
			}
			System.out.println();
			
		}
		for (int i=0;i<a.length;i++) {
			System.out.print(a[i]+" ");
		}
		
	}
	
}